import {AbstractDataAction} from "./AbstractDataAction";
/**
 * Created by enixjin on 1/10/18.
 */
import {Action} from "./index";
import {Observable} from "rxjs/Observable";
import {ActionType} from "./Action";

export abstract class AbstractRESTAction implements Action {
    type = ActionType.REST;

    abstract send(): Observable<any>;

    // will be call when rest request is finished, payload here is rest response
    abstract updateLocal(local, payload): void;

    // return null if no data action after rest call
    abstract getDataAction(payload): AbstractDataAction;
}
